package com.qf.service.Impl;

import com.qf.entity.Phone;
import com.qf.entity.SysUser;
import com.qf.mapper.PhoneMeasureMapper;
import com.qf.service.PhoneService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;

import javax.servlet.http.HttpServletRequest;
import java.util.Date;
import java.util.HashMap;
import java.util.List;

/**
 * --- 人生两件事：走路与识人。道曲难行，路直景稀。---
 *
 * @author LHN
 * @date 2024/7/23
 * @desc
 */
@Service
public class PhonsServiceImpl implements PhoneService {

    @Autowired
    private PhoneMeasureMapper mapper;
    @Override
    public List<Phone> findAll(HashMap<String, String> map) {
        return mapper.findAll(map);
    }

    @Override
    public boolean deleteById(int id) {
        return mapper.deleteById(id);
    }

    @Override
    public boolean delBatch(List<Integer> ids) {
        return mapper.delBatch(ids);
    }

    @Override
    public boolean addPhone(Phone measure) {
        return mapper.addPhone(measure);
    }

    @Override
    public boolean modify(Phone toModify) {      /*测试未启用 修改计量单位 */
        return mapper.modify(toModify);
    }

    @Override
    public boolean upDataMeasure(HashMap<String, String> map) {
        return mapper.upDataMeasure(map);
    }


}
